package com.coderush.admin.sys.service;

import com.coderush.admin.sys.model.dto.MenuAssignDto;
import com.coderush.admin.sys.model.entity.RoleMenu;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.Map;

/**
* @author Administrator
* @description 针对表【sys_role_menu(角色和菜单)】的数据库操作Service
* @createDate 2025-08-29 16:36:40
*/
public interface RoleMenuService extends IService<RoleMenu> {

    /**
     * 查询角色已分配的菜单以及所有菜单
     *
     * @param roleId
     * @return
     */
    Map<String, Object> findAssignMenu(Long roleId) throws Exception;

    /**
     * 角色分配菜单
     */
    boolean assignMenu(MenuAssignDto menuAssignDto) throws Exception;
}
